import { getWechatApi } from '_commonFn/share'
// import { getProductList } from '_network/request'

export default {
    // 设置获取微信SDK状态
    setGetWechatSdkStu({commit}) {
        let getWechatSdkStu = 'ing'
        commit('setGetWechatSdkStu', getWechatSdkStu)
        getWechatApi({ // 获取微信SDK
            fn(isGeted) {
                // console.log('isGeted', isGeted)
                // let getWechatSdkStu = isGeted ? 'success' : 'fail'
                commit('setGetWechatSdkStu', getWechatSdkStu = isGeted ? 'success' : 'fail')
            }
        })
    },
    // 获取产品列表
    getProductList({commit}) {
        const getProductList = require("../network/request").getProductList
        getProductList(data => {
            if (data) {
                commit('setProductList', data)
            }
        })
    },
}